package com.gxa.dao.impl;

import com.gxa.dao.SysUserDao;
import com.gxa.entity.SysUser;
import com.gxa.utils.db.JdbcUtils;

import java.sql.SQLException;

/**
 * Dao层作用：数据访问层，与数据库打交道-数据交互
 */
public class SysUserDaoImpl extends JdbcUtils implements SysUserDao {

    @Override
    public SysUser querySysUserByAccount(String account) throws SQLException {
        // 1. 编写Sql语句
        String sql = "select * from sys_user where account = ?";
        Object[] params = {account};
        // 2. 调用jdbc工具类 -- 调用具体方法  -- 返回结果
        return super.queryEntity(SysUser.class,sql,params);
    }

}
